package com.ytjj.qmyx.mall.mapper;

import com.ytjj.common.model.YxAlipayConfig;
import com.ytjj.common.model.response.OrdersPayResponse;
import com.ytjj.qmyx.mall.model.Orders;
import com.ytjj.qmyx.mall.model.OrdersPay;
import com.ytjj.qmyx.mall.model.OrdersPayExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface OrdersPayMapper {
    long countByExample(OrdersPayExample example);

    int deleteByExample(OrdersPayExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(OrdersPay record);

    int insertSelective(OrdersPay record);

    List<OrdersPay> selectByExampleWithBLOBs(OrdersPayExample example);

    List<OrdersPay> selectByExample(OrdersPayExample example);

    OrdersPay selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") OrdersPay record, @Param("example") OrdersPayExample example);

    int updateByExampleWithBLOBs(@Param("record") OrdersPay record, @Param("example") OrdersPayExample example);

    int updateByExample(@Param("record") OrdersPay record, @Param("example") OrdersPayExample example);

    int updateByPrimaryKeySelective(OrdersPay record);

    int updateByPrimaryKeyWithBLOBs(OrdersPay record);

    int updateByPrimaryKey(OrdersPay record);

    OrdersPay findOrdersPayByOrderNo(@Param("orderNo") String orderNo);

    OrdersPay queryByOrderNo(@Param("orderNo") String orderNo);

    List<OrdersPay> selectResOrderNoByOrderNo(@Param("orderNoList") List<String> orderNoList,Integer payType);

    /**
     * 获取最新的支付订单
     */
    OrdersPay selectByParams(OrdersPay record);

    /**
     * 获取已支付但被关闭的订单
     */
    List<Orders> selectOrdersByPaySuccess();

    /**
     * 根据子订单号查询支付成功的支付信息
     */
    OrdersPayResponse queryByChildOrderNo(@Param("childOrderNo")String childOrderNo);

    YxAlipayConfig findAliPayById(Integer id);
}